home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / internet-drafts / draft-rosenbaum-storage-00.txt < prev    next >
Text File  |  1993-04-14  |  8KB  |  236 lines

  1.  
  2. INTERNET DRAFT                                            Rich Rosenbaum
  3. April 1993                                 Digital Equipment Corporation
  4.  
  5.  
  6.  
  7.                       Using the Domain Name System 
  8.                   To Store Arbitrary String Attributes
  9.  
  10.  
  11.  
  12.  
  13. 1  Status of this Memo
  14.  
  15.    This document is an Internet Draft.  Internet Drafts are
  16.    working documents of the Internet Engineering Task Force
  17.    (IETF), its Areas, and its Working Groups.  Note that other
  18.    groups may also distribute working documents as Internet Drafts.
  19.  
  20.    Internet Drafts are draft documents valid for a maximum of six
  21.    months.  Internet Drafts may be updated, replaced, or obsoleted
  22.    by other documents at any time.  It is not appropriate to use
  23.    Internet Drafts as reference material or to cite them other
  24.    than as a ``working draft'' or ``work in progress.''
  25.    Please check the 1id-abstracts.txt listing contained in the
  26.    internet-drafts Shadow Directories on nic.ddn.mil,
  27.    nnsc.nsf.net, nic.nordu.net, ftp.nisc.sri.com, or munnari.oz.au
  28.    to learn the current status of any Internet Draft.
  29.  
  30.    This paper proposes a syntax for storing and accessing arbitrary 
  31.    attribute names and values when using the Domain Name System.  
  32.    Discussion and suggestions for improvements are welcome. Distribution
  33.    of this memo is unlimited.
  34.  
  35.  
  36. 2  Abstract
  37.  
  38.    While the Domain Name System (DNS) [2,3] is generally used to store
  39.    predefined types of information (e.g., addresses of hosts), it
  40.    is possible to use it to store information that has not been
  41.    previously classified.
  42.  
  43.    This paper describes a simple means to associate arbitrary string
  44.    information (ASCII text) with attributes that have not been defined
  45.    by the DNS.  It uses DNS TXT resource records to store the
  46.    information.  It requires no change to current DNS implementations.
  47.  
  48.  
  49. 3  Introduction
  50.  
  51.    The Domain Name System is designed to store information that has
  52.    both a predefined type and structure.  Examples include IP addresses
  53.    of hosts and names of mail exchangers.  It would be useful to take
  54.    advantage of the widespread use and scaleability of the DNS to store
  55.    information that has not been previously defined.
  56.  
  57.  
  58. Rosenbaum         Document expiration: 18 October 1993          [Page 1]
  59.  
  60.  
  61. Storing Arbitrary Attributes in DNS                           March 1993
  62.  
  63.  
  64.    This paper proposes the use of the DNS TXT resource record (defined
  65.    in RFC 1035) to contain new types of information.  The principal 
  66.    advantage of such an approach is that it requires no change to most 
  67.    existing DNS servers.  It is not intended to replace the process by 
  68.    which new resource records are defined and implemented.
  69.  
  70.  
  71. 4  Format of TXT record
  72.  
  73.    To store new types of information, the TXT record uses a
  74.    structured format in its TXT-DATA field.  The format consists
  75.    of the attribute name followed by the value of the attribute.
  76.    The name and value are separated by an equals sign (=).
  77.  
  78.    For example, the following TXT records contain attributes
  79.    specified in this fashion:
  80.  
  81.         host.widgets.com   IN   TXT   "printer=lpr5"
  82.         sam.widgets.com    IN   TXT   "favorite drink=orange juice"
  83.  
  84.    The general syntax is:
  85.  
  86.         <owner> <class> <ttl> TXT "<attribute name>=<attribute value>"
  87.  
  88.  
  89.    Attribute Names
  90.  
  91.    Any printable ASCII character is permitted for the attribute name.
  92.    If an equals sign is embedded in the attribute name, it must be 
  93.    quoted with a preceding grave accent (or backquote: "`").
  94.    A backquote must also be quoted with an additional "`".
  95.  
  96.  
  97.    Attribute Name Matching Rules
  98.  
  99.    The attribute name is considered case-insensitive.  For example, 
  100.    a lookup of the attribute "Favorite Drink" would match a TXT record
  101.    containing "favorite drink=Earl Grey tea".
  102.  
  103.    During lookups, TXT records that do not contain an unquoted "=" are 
  104.    ignored.  TXT records that seem to contain a null attribute name, that 
  105.    is, the TXT-DATA starts with the character "=", are also ignored.
  106.  
  107.    Leading and trailing whitespace (spaces and tabs) in the attribute 
  108.    name are ignored unless they are quoted (with a "`").  For example, 
  109.    "abc" matches " abc<tab>" but does not match "` abc".
  110.  
  111.    Note that most DNS server implementations require a backslash (\)
  112.    or double quote (") in a text string to be quoted with a preceding 
  113.    backslash.  Accent grave ("`") was chosen as a quoting character in
  114.    this syntax to avoid confusion with "\" (and remove the need for 
  115.    confusing strings that include sequences like "\\\\").
  116.  
  117. Rosenbaum         Document expiration: 18 October 1993          [Page 2]
  118.  
  119.  
  120. Storing Arbitrary Attributes in DNS                           March 1993
  121.  
  122.  
  123.    Attribute Values
  124.  
  125.    All printable ASCII characters are permitted in the attribute value.
  126.    No characters need to be quoted with a "`".  In other words, the 
  127.    first unquoted equals sign in the TXT record is the name/value 
  128.    delimiter.  All subsequent characters are part of the value.
  129.  
  130.    Once again, note that in most implementations the backslash character
  131.    is an active quoting character (and must, itself, be quoted).
  132.  
  133.    All whitespace in the attribute value is returned to the requestor
  134.    (it is up to the application to decide if it is significant.)
  135.  
  136.  
  137.    Examples
  138.  
  139.    <sp> indicates a space character.
  140.  
  141.    Attribute     Attribute    Internal Form           External Form
  142.    Name         Value           (server to resolver)    (TXT record)
  143.  
  144.    color    blue        color=blue        "color=blue"
  145.    equation    a=4        equation=a=4        "equation=a=4"
  146.    a=a        true        a`=a=true        "a`=a=true"
  147.    a\=a        false        a\`=a=false        "a\\`=a=false"
  148.    =        \=        `==\=            "`==\\="
  149.  
  150.    string    "Cat"        string="Cat"        "string=\"Cat\""
  151.    string2    `abc`        string2=``abc``        "string2=``abc``"
  152.    novalue            novalue=        "novalue="
  153.    a b        c d        a b=c d            "a b=c d"
  154.    abc<sp>    123<sp>        abc` =123<sp>        "abc` =123 "
  155.  
  156.  
  157. 5  Application Usage
  158.  
  159.    The attributes can be accessed by the standard resolver library, but 
  160.    it is recommended that a library routine designed specially for 
  161.    this attribute format be used.  Such a routine might provide an
  162.    analogue to gethostbyname:
  163.  
  164.          getattributebyname(objectname,          name of object
  165.                             attributename,       name of attribute
  166.                             attributevalue,      pointer to buffer
  167.                             attributevaluelen)   length of buffer
  168.  
  169.    This routine would remove all quoting characters before returning
  170.    the information to the caller.  A more complex routine could return 
  171.    attributes with multiple values, or several different attributes.
  172.  
  173.  
  174.  
  175.  
  176. Rosenbaum         Document expiration: 18 October 1993          [Page 3]
  177.  
  178.  
  179. Storing Arbitrary Attributes in DNS                           March 1993
  180.  
  181.  
  182. 6  Attribute Name Registration
  183.  
  184.    To permit ease of interoperability and to reduce the chance of 
  185.    naming conflicts, a registration process for well known attribute
  186.    names might be established.  This could be a periodically updated
  187.    list of names and/or adherence to other name registration mechanisms
  188.    such as published object identifiers.
  189.  
  190.    This paper does not address attribute name registration.
  191.  
  192.  
  193. 7  Restrictions
  194.  
  195.    Some DNS server implementations place limits on the size or number
  196.    of TXT records associated with a particular owner.  Certain
  197.    implementations may not support TXT records at all.
  198.  
  199.  
  200. 8  REFERENCES and BIBLIOGRAPHY
  201.  
  202.    [1] Stahl, M., "Domain Administrators Guide", RFC 1032, Network
  203.        Information Center, SRI International, November 1987.
  204.  
  205.    [2] Mockapetris, P., "Domain Names - Concepts and Facilities", RFC
  206.        1034, USC/Information Sciences Institute, November 1987.
  207.  
  208.    [3] Mockapetris, P., "Domain Names - Implementation and
  209.        Specification", RFC 1035, USC/Information Sciences Institute,
  210.        November 1987.
  211.  
  212.    [4] Mockapetris, P., "DNS Encoding of Network Names and Other Types", 
  213.        RFC 1101, USC/Information Sciences Institute, April 1989.
  214.  
  215.  
  216. 9  Security Considerations
  217.  
  218.    Security issues are not addressed in this memo.
  219.  
  220.  
  221. 10 Author's Address
  222.  
  223.    Rich Rosenbaum
  224.    Digital Equipment Corporation
  225.    550 King Street, LKG2-2/Z7
  226.    Littleton, MA  01460-1289
  227.  
  228.    Phone: 508-486-5922
  229.  
  230.    Email: rosenbaum@lkg.dec.com
  231.  
  232.  
  233.  
  234.  
  235. Rosenbaum         Document expiration: 18 October 1993          [Page 4]
  236.